home *** CD-ROM | disk | FTP | other *** search
- head 1.8;
- access ;
- symbols ;
- locks ; strict;
- comment @@;
-
-
- 1.8
- date 88.05.27.15.39.55; author deboor; state Exp;
- branches ;
- next 1.7;
-
- 1.7
- date 88.05.17.13.33.01; author deboor; state Exp;
- branches ;
- next 1.6;
-
- 1.6
- date 88.05.04.14.04.23; author deboor; state Exp;
- branches ;
- next 1.5;
-
- 1.5
- date 88.04.29.18.34.33; author deboor; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 88.04.29.18.27.24; author deboor; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 88.03.28.13.35.00; author deboor; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 88.03.28.12.56.25; author deboor; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.03.24.19.47.01; author deboor; state Exp;
- branches ;
- next ;
-
-
- desc
- @Included makefile for kernel module machine-specific directory
- @
-
-
- 1.8
- log
- @Added -I. to allow machine-independent files to include
- machine-dependent ones.
- @
- text
- @#
- # Main file for creating the object files for a kernel module
- # Variables:
- # SRCS All sources used to make the module
- # CSRCS All C-code sources
- # SSRCS All assembly-language sources
- # HDRS All headers in the module
- # MODULE The module being created (e.g. fs, vm, etc.)
- # MACH Machine for which module is being created (UPPER-CASE)
- # MACHDIR Machine-specific directory prefix (lower-case)
- # LINTLIBS All lint libraries not including that for this
- # module.
- #
- # $Header: kernelObj.mk,v 1.7 88/05/17 13:33:01 deboor Exp $ SPRITE (Berkeley)
- #
-
- PROFDIR ?= /sprite/src/kernel/Profiled/$(MACHDIR)
- BINDIR ?= /sprite/cmds
- INCLUDEDIR ?= /sprite/src/kernel/Include
- LINTDIR ?= /sprite/src/kernel/Lint
- LIBDIR ?= /sprite/src/kernel/$(MACHDIR).md
- INSTALLDIR ?= /sprite/src/kernel/Installed/$(MODULE)/$(MACHDIR).md
-
- OBJS = $(SRCS:S/.c$/.o/g:S/.s$/.o/g)
- POBJS = $(OBJS:S/.o$/.po/g)
-
- LD ?= $(BINDIR)/ld
- RM ?= $(BINDIR)/rm
- MV ?= $(BINDIR)/mv
- CP ?= $(BINDIR)/cp
- UPDATE ?= $(BINDIR)/update
- SED ?= $(BINDIR)/sed
- CPP ?= /sprite/lib/cpp
- LINT ?= $(BINDIR)/lint
-
- .MAKEFLAGS : -C
-
- #
- # Compiler flags. Note any machine-specific flags (e.g. -m68010) are defined
- # in the including makefile
- #
- CCFLAGS ?=
- CAFLAGS ?=
- CTFLAGS ?=
- CFLAGS += -D$(MACH) -g -I. $(.INCLUDES) $(.LIBS) $(CCFLAGS)
- AFLAGS += $(CAFLAGS)
- LINTFLAGS += -u
-
- .PATH.h :
- .PATH.h : .. $(INCLUDEDIR)
- .PATH.ln : $(LINTDIR)
- .PATH.c : ..
- .PATH.s : ..
-
- .SUFFIXES : .po
-
- #
- # Transformation rules
- #
- .c.po :
- $(CC) -S $(CFLAGS) -p -DPROFILE $(.IMPSRC)
- $(AS) -o $(.TARGET) $(AFLAGS) $(.PREFIX).s
- $(RM) -f $(.PREFIX).s
-
- .s.po .s.o :
- $(CPP) $(CFLAGS:M-[ID]*) $(.IMPSRC) > $(.PREFIX).pp
- $(AS) -o $(.TARGET) $(AFLAGS) $(.PREFIX).pp
- $(RM) -f $(.PREFIX).pp
-
-
- #
- # Module-specific targets that actually correspond to files
- #
- $(MODULE).o : $(OBJS)
- rm -f $(.TARGET)
- $(LD) -r $(.ALLSRC) -o $(.TARGET)
-
- llib-l$(MODULE).ln : $(CSRCS) $(HDRS)
- $(RM) -f $(.TARGET)
- $(LINT) -C$(MODULE) $(CFLAGS:M-[ID]*) $(LINTFLAGS) $(.ALLSRC:M*.c)
-
- $(LINTDIR)/$(MODULE).ln : llib-l$(MODULE).ln
- $(RM) -f $(.TARGET)
- $(CP) llib-l$(MODULE).ln $(.TARGET)
-
- $(LIBDIR)/$(MODULE).o : $(MODULE).o
- $(UPDATE) $(MODULE).o $(LIBDIR)
-
- $(PROFDIR)/$(MODULE).o : $(POBJS)
- $(RM) -f $(.TARGET)
- $(LD) -o $(.TARGET) -r $(.ALLSRC)
-
- #
- # Alias targets
- #
- install :: installobj instlint installsrc
- instlint :: $(LINTDIR)/$(MODULE).ln
- installobj :: $(LIBDIR)/$(MODULE).o
- profile :: $(PROFDIR)/$(MODULE).o
- lint : $(CSRCS) $(LINTLIBS)
- $(RM) -f $(.TARGET)
- $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(.ALLSRC) > lint 2>& 1
-
- installsrc :: installhdrs
- installsrc ::
- #if !empty(MDCSRCS) || !empty(MDSSRCS)
- $(UPDATE) $(MDCSRCS) $(MDSSRCS) $(INSTALLDIR)
- #endif
-
- installhdrs ::
- #if !empty(MDPUBHDRS)
- $(UPDATE) $(MDPUBHDRS) $(INCLUDEDIR)
- #endif
- #if !empty(MDHDRS)
- $(UPDATE) $(MDHDRS) $(INSTALLDIR)
- #endif
-
- clean ::
- $(RM) -f lint *.o *.po *~
-
- #
- # Because the entries in the tags file will be accessed from the directory
- # in which the tags file resides, and the machine-dependent sources aren't
- # there, we change all the source file names to be absolute by prepending
- # the current directory to them. This is how they'll appear in the tags file.
- #
- tags :: $(CSRCS) $(HDRS)
- cwd=`pwd`
- ctags $(CTFLAGS) `echo $(.ALLSRC) | \
- sed -e "s%^%$cwd/%" -e "s% % $cwd/%g"`
- cp tags ..
-
- DEPFLAGS += -w50
- NODEPEND = TRUE
- #include <makedepend.mk>
-
- #
- # After creating the dependencies file (and only if we created it), make all
- # the profiled objects depend on the same things as their non-profiled
- # counterparts by inserting the correct .po file at the beginning of each
- # non-comment line in the file.
- #
- depend : $(DEPFILE) .JOIN
- $(MV) $(DEPFILE) $(DEPFILE).$$$$
- $(SED) -e '/^#/!s/^\([^:]*\)\.o[ ]*:/\1.po &/' < $(DEPFILE).$$$$ \
- > $(DEPFILE)
- $(RM) -f $(DEPFILE).$$$$
-
- $(DEPFILE) ! $(CSRCS) $(SSRCS) MAKEDEPEND
-
- mkmf :: # Does nothing. says nothing
- @
-
-
- 1.7
- log
- @Added tags rule
- @
- text
- @d14 1
- a14 1
- # $Header: kernelObj.mk,v 1.6 88/05/04 14:04:23 deboor Exp $ SPRITE (Berkeley)
- d45 1
- a45 1
- CFLAGS += -D$(MACH) -g $(.INCLUDES) $(.LIBS) $(CCFLAGS)
- @
-
-
- 1.6
- log
- @Added passing of .s sources to makedepend as well as .c sources...
- @
- text
- @d9 2
- a10 2
- # MACH Machine for which module is being created
- # MACHDIR Machine-specific directory suffix
- d14 1
- a14 1
- # $Header: kernelObj.mk,v 1.5 88/04/29 18:34:33 deboor Exp $ SPRITE (Berkeley)
- d44 1
- d106 3
- a108 3
- if [ ! -z "$(MDCSRCS)" -o ! -z "$(MDSSRCS)" ]; then
- $(UPDATE) $(MDCSRCS) $(MDSSRCS) $(INSTALLDIR)
- fi
- d111 6
- a116 6
- if [ ! -z "$(MDPUBHDRS)" ]; then
- $(UPDATE) $(MDPUBHDRS) $(INCLUDEDIR)
- fi
- if [ ! -z "$(MDHDRS)" ]; then
- $(UPDATE) $(MDHDRS) $(INSTALLDIR)
- fi
- d120 12
- @
-
-
- 1.5
- log
- @Added Header
- @
- text
- @d14 1
- a14 1
- # $Header$ SPRITE (Berkeley)
- d136 1
- a136 1
- $(DEPFILE) ! $(CSRCS) MAKEDEPEND
- @
-
-
- 1.4
- log
- @Added installation of machine-dependent sources
- @
- text
- @d14 2
- @
-
-
- 1.3
- log
- @Added use of $(AFLAGS) in .c -> .po transformation
- @
- text
- @d18 3
- a20 2
- LINTDIR ?= /sprite/src/kernel/Lint/$(MACHDIR)
- LIBDIR ?= /sprite/src/kernel/Object/$(MACHDIR)
- d54 3
- d68 3
- d90 4
- a93 1
- install :: installobj instlint
- d100 14
- @
-
-
- 1.2
- log
- @Added command-line flags for AS and CC
- @
- text
- @d55 1
- a55 1
- $(AS) -o $(.TARGET) $(.PREFIX).s
- d58 1
- a58 1
- .s.o :
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d35 8
- a42 1
- CFLAGS += -D$(MACH) -g $(.INCLUDES) $(.LIBS)
- d49 1
- d60 1
- a60 1
- $(AS) -o $(.TARGET) $(.PREFIX).pp
- @
-